#ifndef SENDVIDEO_H
#define SENDVIDEO_H

#include <QObject>
#include <opencv2/opencv.hpp>
#include <QDebug>
#include <QPair>
#include <QMap>
#include <QTimer>
#include <QMutex>
#include <QList>
#include <QMessageBox>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QDir>

class sendVideo : public QObject
{
    Q_OBJECT
public:
    explicit sendVideo(QList<QString>& fileList, QString& appDirPath,QList<QPair<QString, QVector<QPair<QString, QJsonArray> > > > &listpair,QObject *parent = nullptr);
    ~sendVideo();
    void startRun();

    // void _start();

    void Run();
    bool splitVideoByFixedFrames(const std::string& inputVideoPath, const std::string& outputVideoPrefix, int framesPerSegment);
signals:
    void OK(const QString& outputVideo);
    void end();
    void _start();
private:
    QList<QString>& m_fileList;
    QString&  m_appDirPath;
    QList<QPair<QString, QVector<QPair<QString, QJsonArray>>>>& m_listpair;


    bool flag = false;
};

#endif // SENDVIDEO_H
